class Point {
	constructor (param) {
		this.x = param.x || 0;
		this.y = param.y || 0;
		this.lineWidth = param.lineWidth || 1;
		this.lineColor = param.lineColor || '#fcae0b';
		this.scalePoint = param.scalePoint || false;
		this.radius = param.radius || 0;
		this.index = param.index;
		this.value = param.value || 0;
	}

	draw (ctx) {
		ctx.setStrokeStyle(this.lineColor);
		if(this.index === 0) {
			ctx.moveTo(this.x, this.y);
		} else {
			ctx.lineTo(this.x, this.y);
		}
		
	}
	drawPoint (ctx) {
		if (this.scalePoint) {
			ctx.beginPath();
			ctx.setFillStyle(this.lineColor);
			ctx.arc(this.x, this.y, this.radius, 0, Math.PI * 2);
			ctx.closePath();
			ctx.fill();
		}
	}

	static darwAverage (ctx, value, width) {

	}
}

module.exports = Point;